<script setup lang="ts">
// import zhCn from 'element-plus/dist/locale/zh-cn.mjs';
// import en from 'element-plus/dist/locale/en.mjs';
// import { ref } from 'vue';
// import { useI18n } from 'vue-i18n';
import { useRoute } from 'vue-router';
//const { locale: localeLanguage } = useI18n();
import commonHeader from './components/layout/commonHeader.vue';
import commonFooter from './components/layout/commonFooter.vue';
//const locale = ref(zhCn);
// const changeLang = (language: any) => {
//   locale.value = language;
//   localeLanguage.value = language.name;
// };
import { useStore } from '@/store';
const store = useStore();
const route = useRoute();
</script>

<template>
  <el-config-provider :locale="store.state.locale">
    <!--头部-->
    <commonHeader v-show="route.fullPath.indexOf('login') === -1" />
    <!--主体-->
    <div class="container">
      <router-view />
    </div>
    <!--底部-->
    <commonFooter v-show="route.fullPath.indexOf('login') === -1" />
  </el-config-provider>
</template>

<style scoped></style>
